(function() {
  window.addEventListener('message', function(e) {
    if(window == window.parent || e.source != window.parent) return;
    data = JSON.parse(e.data);
    if(data) {
      window.localStorage['rt-account-activity'] = JSON.stringify(data.account);
    }
  },false);

  if(window.parent != window) {
    console.log("send get_account");
    window.parent.postMessage('get_account', '*');
  }
})();
